#!coding=utf-8

import asyncio
import time

async def say_after(delay, what):
    await asyncio.sleep(delay)
    return f"{what} - {delay}"
async def main():


    task1 = asyncio.create_task(say_after(1, 'hello'))
    task2 = asyncio.create_task(say_after(2, 'world'))

    print(f'start at {time.strftime("%X")}')

    ret = await asyncio.gather(task1, task2)

    print(ret)

    print(f'finish at {time.strftime("%X")}')

asyncio.run(main())